package com.rightsidetech.system.mapper;

import com.rightsidetech.system.dtos.request.adverts.AdvertsPageReq;
import com.rightsidetech.system.dtos.response.adverts.AdvertsPageResp;
import com.rightsidetech.system.dtos.response.adverts.AppAdvertsResp;
import com.rightsidetech.system.entity.adverts.SysAdvertsLoad;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

public interface SysAdvertsLoadMapper {
    int deleteByPrimaryKey(Long id);

    int insert(SysAdvertsLoad record);

    int insertSelective(SysAdvertsLoad record);

    SysAdvertsLoad selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(SysAdvertsLoad record);

    int updateByPrimaryKey(SysAdvertsLoad record);

    Long selectCountByTopic(String topic);

    Long selectCountByStartDate(@Param("startDate") Date startDate,@Param("platform") Byte platform,@Param("id") Long id);

    List<AdvertsPageResp> selectPage(AdvertsPageReq req);
    Integer selectPage_COUNT(AdvertsPageReq req);

    AppAdvertsResp selectAppAdverts(Byte platform);

    AdvertsPageResp selectById(Long id);
}